import { createRouter, createWebHashHistory } from 'vue-router'

import index from '../views/index.vue'
import test from '../views/test.vue'
const routes = [
	{
		path: '/',
		name: 'index',
		component: index,
	},
	{
		path: '/homePage',
		name: 'HomePage',
		component: () => import('../views/homePage.vue'),
		meta: { keepAlive: false },
	},
	{
		path: '/test',
		name: 'test',
		component: () => import('../views/test.vue'),
		meta: { keepAlive: false },
	},
	{
		path: '/documentPage',
		name: 'DocumentPage',
		component: () => import('../views/documentPage.vue'),
		meta: { keepAlive: false },
	},
	{
		path: '/changeDetection',
		name: 'changeDetection',
		component: () => import('../views/changeDetection.vue'),
		meta: { keepAlive: false, type: 0 },
	},
	{
		path: '/geophysicalClassification',
		name: 'geophysicalClassification',
		component: () => import('../views/geophysicalClassification.vue'),
		meta: { keepAlive: false, type: 3 },
	},
	{
		path: '/targetDetection',
		name: 'targetDetection',
		component: () => import('../views/targetDetection.vue'),
		meta: { keepAlive: false, type: 1 },
	},
	{
		path: '/objectiveExtraction',
		name: 'objectiveExtraction',
		component: () => import('../views/objectiveExtraction.vue'),
		meta: { keepAlive: false, type: 2 },
	},
	// {
	// 	path: '/t1',
	// 	name: 't1',
	// 	//推荐使用这种方法
	// 	component: () => import('../views/transition.vue'),
	// },
]

const router = createRouter({
	history: createWebHashHistory(),
	routes,
})

export default router
